{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "FOR Runtime = 9.97304916381836 ms.\n",
      "INNER FUNCTION Runtime = 1.9943714141845703 ms.\n"
     ]
    }
   ],
   "source": [
    "import time\n",
    "\n",
    "t1 = time.time()\n",
    "s = 0\n",
    "\n",
    "for i in range(100000):\n",
    "    s += i\n",
    "t2 = time.time()\n",
    "print(s)\n",
    "x = 1000 * (t2 - t1)\n",
    "print(f'FOR Runtime = {x} ms.')\n",
    "\n",
    "t3 = time.time()\n",
    "s = sum(range(100000))\n",
    "print(s)\n",
    "t4 = time.time()\n",
    "x = 1000 * (t4 - t3)\n",
    "print(f'INNER FUNCTION Runtime = {x} ms.')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
